package com.example.avatar;

import java.util.LinkedList;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.ImageView;

public class MainActivity extends Activity {
	
	/** Constants **/
	ImageView image;
	public int[] bodyList = new int[4];
	int pos = 0;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		
		bodyList[0] = R.drawable.gbody;
		bodyList[1] = R.drawable.rbody;
		bodyList[2] = R.drawable.ybody;
		bodyList[3] = R.drawable.bbody;
		
		
		return true;
		
		
	}
	
	/** Called when the user clicks the Send button */
	public void  changeImageR(View view) {
		
		image = (ImageView) findViewById(R.id.headAvatar);
		pos++;
		image.setImageResource(bodyList[pos]);
	}
	
	/** Called when the user clicks the Send button */
	public void  changeImageL(View view) {
		
		image = (ImageView) findViewById(R.id.headAvatar);
		pos--;
		image.setImageResource(R.drawable.ybody);
	}

}
